<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"vchao.top","root":"/","scheme":"Muse","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="恩，我这个人有个癖好，就是爱收集各种快捷键，office，ps一类的快捷键收集了好多。原因嘛，还是那句话，工欲善其事，必先利其器。能有事半功倍的办法，何乐而不为呢？  我这里只是总结一下经常会使用到的快捷键。但是最好是实践出真知，不要硬性背，或许能够有更好的效果。 |  快捷键  |  功能作用描述 || ————- |:————-:| —–:||Ctrl+E|    打开最近操作的文件|Ctr">
<meta property="og:type" content="article">
<meta property="og:title" content="Android Studio：想要事半功倍，你需要记住这些快捷键">
<meta property="og:url" content="http://vchao.top/2017/05/12/Android%20Studio%EF%BC%9A%E6%83%B3%E8%A6%81%E4%BA%8B%E5%8D%8A%E5%8A%9F%E5%80%8D%EF%BC%8C%E4%BD%A0%E9%9C%80%E8%A6%81%E8%AE%B0%E4%BD%8F%E8%BF%99%E4%BA%9B%E5%BF%AB%E6%8D%B7%E9%94%AE/index.html">
<meta property="og:site_name" content="乘风破浪">
<meta property="og:description" content="恩，我这个人有个癖好，就是爱收集各种快捷键，office，ps一类的快捷键收集了好多。原因嘛，还是那句话，工欲善其事，必先利其器。能有事半功倍的办法，何乐而不为呢？  我这里只是总结一下经常会使用到的快捷键。但是最好是实践出真知，不要硬性背，或许能够有更好的效果。 |  快捷键  |  功能作用描述 || ————- |:————-:| —–:||Ctrl+E|    打开最近操作的文件|Ctr">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2017-05-12T12:03:39.000Z">
<meta property="article:modified_time" content="2021-08-25T14:37:20.793Z">
<meta property="article:author" content="vchao">
<meta property="article:tag" content="Android">
<meta property="article:tag" content="快捷键">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="http://vchao.top/2017/05/12/Android%20Studio%EF%BC%9A%E6%83%B3%E8%A6%81%E4%BA%8B%E5%8D%8A%E5%8A%9F%E5%80%8D%EF%BC%8C%E4%BD%A0%E9%9C%80%E8%A6%81%E8%AE%B0%E4%BD%8F%E8%BF%99%E4%BA%9B%E5%BF%AB%E6%8D%B7%E9%94%AE/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Android Studio：想要事半功倍，你需要记住这些快捷键 | 乘风破浪</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">乘风破浪</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://vchao.top/2017/05/12/Android%20Studio%EF%BC%9A%E6%83%B3%E8%A6%81%E4%BA%8B%E5%8D%8A%E5%8A%9F%E5%80%8D%EF%BC%8C%E4%BD%A0%E9%9C%80%E8%A6%81%E8%AE%B0%E4%BD%8F%E8%BF%99%E4%BA%9B%E5%BF%AB%E6%8D%B7%E9%94%AE/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="vchao">
      <meta itemprop="description" content="怀揣好奇，梦想改变世界的菜鸟极客">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="乘风破浪">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Android Studio：想要事半功倍，你需要记住这些快捷键
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2017-05-12 20:03:39" itemprop="dateCreated datePublished" datetime="2017-05-12T20:03:39+08:00">2017-05-12</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-08-25 22:37:20" itemprop="dateModified" datetime="2021-08-25T22:37:20+08:00">2021-08-25</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Android/" itemprop="url" rel="index"><span itemprop="name">Android</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <blockquote>
<p>恩，我这个人有个癖好，就是爱收集各种快捷键，office，ps一类的快捷键收集了好多。原因嘛，还是那句话，工欲善其事，必先利其器。能有事半功倍的办法，何乐而不为呢？</p>
</blockquote>
<p>我这里只是总结一下经常会使用到的快捷键。但是最好是实践出真知，不要硬性背，或许能够有更好的效果。</p>
<p>|  快捷键  |  功能作用描述 |<br>| ————- |:————-:| —–:|<br>|Ctrl+E|    打开最近操作的文件<br>|Ctrl+Z    |撤销<br>|Ctrl+Shift+Z    |重做(在Eclipse中使用的是Ctrl+Y)<br>|Ctr+Y    |删除该行(Eclipse中的删除该行是Ctrl+D)<br>|Ctrl+D|    向下复制该行<br>|F11    |将鼠标停留的所在行加入书签Bookmarks中，可以使用快捷键Alt+2查看所有的书签以及Favorites和断点BreakPoints<br>|Ctrl+Alt+向左/右箭头    |遍历你的导航操作(如光标移动、选项卡切换和文件打开)<br>|Alt+左右箭头    |可以在所有已经打开的文件中左右切换<br>|Alt+数字1、2、3、4、5、6···    |可以打开相对应的工具按钮(分布在Android Studio的左、下、右边边，并且其中一些按钮还有一个对应的小数字)，使用Alt+对应的数字|就能打开或者关闭这些按钮了<br>|Ctrl+Shift+V    |复制历史记录<br>|Ctrl+Alt+Shift+C    |复制方法、变量、或类的逻辑引用，当把此引用粘贴到另一个源文件中时能够自动导入所需的限定符和导入语句<br>|Ctrl+Shift+A    |弹出的搜索框中输入你想搜索的内容(Android Studio的具备的特性、功能)，系统会给出结果，这货很有用<br>|Alt+F1    |出现Select In 对话框，可以进行一些便捷的操作，虽然好用但是还不如用鼠标<br>|Ctrl+N    |在弹出的对话框中输入类的名字可以直接打开该类，超赞<br>|Ctrl+Shift+N    |在弹出的对话框中输入文件的名字可以直接打开该文件，比起上一个能打开的文件更多<br>|Ctrl+G    |可以输入想要到达的行数或者行数:列数，文件很长的时候很有用<br>|Ctrl+Alt+Home    |可以打开与当前文件相关联的文件，例如打开的MainActivity.java，那么他的相关文件就会是activity_main.xml ,你的同事绝对不知道这一点<br>|Ctrl+H|    可以查看当前类(只有在java文件中有效)的继承关系，你会发现不出意外的话Alt+8 与其效果是同样的<br>|Ctrl+数字加号    |展开光标所在处已折叠的代码块<br>|Ctrl+数字减号|    折叠光标所在处已展开的代码块<br>|Ctrl+Shift+数字加号    |展开所有已折叠的代码块<br>|Ctrl+Shift+数字减号|    折叠所有已展开的代码块<br>|Ctrl+空格|    代码提示，但是Windows系统下好像是输入法的切换，如果你还是想使用这个快捷键，要么将其改为Ctrl+3，要么就修改注册表咯。方法1，方法2<br>|Alt+Enter    |绝对是用的最多的，可以自动补全当行并且将光标跳到下一行，当新引入一个类但是还没有导入的时候，只需要对着类的名字使用该快捷键就可以自动导入了<br>|Shift+Enter    |直接从当前行跳转到下一行，不用将光标置于当前行末尾然后再按回车，十分方便<br>|Alt+/|    同样也是代码提示，不过这个提示只是提供在文件中使用过的单词，向上循环<br>|Alt+Shift+/|    还是代码提示，提示只提供在文件中使用过的单词，向下循环<br>|Ctrl+/|    代码注释，适用于单行，也可以选择多行，用得最多的了，不用我强调的啦<br>|Ctrl+Shift+/|  块注释<br>|Alt+Insert|    呼出Generate命令<br>|Ctrl+J    |插入代码模板，或者如果你记得代码模板的名称，例如fbc，接着是用Ctrl+J，则可以直接插入() findViewById(R.id.)<br>|Ctrl+Alt+J    |当选择一个单词之后使用该快捷键可以直接呼出模板，选择其中你需要的就行了<br>|Ctrl+Shift+向上箭头/向下箭头    |在作用域的范围内上/下移一条或多条语句，如果移动的是代码块，则整个代码块将会一起移动到下一个语法正确的位置<br>|Alt+Shift+向上箭头/向下箭头|    将一条或多条语句向上/下移动而不考虑作用范围以及语法是否正确<br>|Ctrl+Alt+I    |根据Code Style 中设置的方案，对当前鼠标所在的行或选中的多行进行缩进，保持代码美观很有效<br>|Ctrl+Alt+O    |组织导入语句<br>|Ctrl+Alt+L|    对文件的代码格式进行重新的整理<br>|Ctrl+Alt+T    |选中需要包裹的语句，使用该快捷键可以快速的将其被try catch，if/else，for或者for each 等包裹，用熟了会很方便<br>|Ctrl+Shift+Delete|    选中不想被包裹的语句，使用改快捷键可以删除try catch，if/else，for或者for each等代码块<br>|Ctrl+Alt+Shift+T|    呼出Refactor This对话框，可以做很多有关重构的事情，四个快捷键可以记住成CAST<br>|Shift+F6|    重命名该文件<br>|Ctrl+F6    |修改方法名以及参数<br>|Ctrl+Shift+F6|    类型迁移<br>|F6|    移动文件或者移动变量到另一个文件<br>|F5    |复制文件或者复制变量到另一个文件<br>|Home|    将光标置于当前行的首个字母前<br>|End    |将光标置于当前行的末尾<br>|Ctrl+Alt+V    |抽取变量(variable)<br>|Ctrl+Alt+C|    抽取常量(constant)<br>|Ctrl+Alt+F    |抽取字段(filed)<br>|Ctrl+Alt+P    |抽取参数(parameter)<br>|Ctrl+Alt+M    |抽取方法(Method)<br>|Ctrl+K    |Git提交修改<br>|Shift+F10    |运行项目<br>|Ctrl+Alt+S    |设置<br>|Ctrl+Alt+Shift+S    |项目结构设置</p>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Android/" rel="tag"># Android</a>
              <a href="/tags/%E5%BF%AB%E6%8D%B7%E9%94%AE/" rel="tag"># 快捷键</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2017/05/12/Kotlin%E6%98%AF%E4%B8%AA%E4%BB%80%E4%B9%88%E4%B8%9C%E4%B8%9C%EF%BC%9F/" rel="prev" title="Kotlin是个什么东东？">
      <i class="fa fa-chevron-left"></i> Kotlin是个什么东东？
    </a></div>
      <div class="post-nav-item">
    <a href="/2017/05/12/AS%E9%83%A8%E7%BD%B2%E5%A4%B1%E8%B4%A5%EF%BC%8CDevice%20supports,but%20APK%20only%20supports.../" rel="next" title="AS部署失败，Device supports,but APK only supports...">
      AS部署失败，Device supports,but APK only supports... <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">vchao</p>
  <div class="site-description" itemprop="description">怀揣好奇，梦想改变世界的菜鸟极客</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">46</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">27</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">冀ICP备 17022751号-1 </a>
      <img src="https://beian.miit.gov.cn" style="display: inline-block;">
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">vchao</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://muse.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
